package com.mybatisplus.mp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mybatisplus.mp.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Update("update  `user` set createTime=#{cTime} where id=#{id}")
    int updateTime(User user);


    @Insert("insert into `user` (id,name,updateTime) values (#{id},#{name},#{uTime})")
    int insertInto(User user);

    List<User> findTest(Map<String, Object> map);

    List<User> findBatch(List<String> valueList);

    int batchDeleteByCondition(List<User> users);

    User findById(@Param("id") int id);

    List<User> orderMy();
}
